package frame.options.simulator;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;

import javax.swing.ImageIcon;
import javax.swing.JMenuItem;

@SuppressWarnings("serial")
public class ExitMenuItem extends JMenuItem implements ActionListener
{
	public ExitMenuItem()
	{
		this.setText( "Exit" );
		this.setIcon( new ImageIcon( this.getClass().getResource( "/icons/exit.png" ) ) );
		this.setMnemonic( KeyEvent.VK_E );		
		this.addActionListener( this );
	}
	
	@Override
	public void actionPerformed( ActionEvent actionEvent )
	{
		System.exit( 0 );
	}
	
}
